package com.own.component.log.login.core.impl;

import com.alibaba.fastjson2.JSON;
import com.own.component.log.login.core.PersistenceLogLoginHook;
import com.own.component.log.login.entity.LogLoginEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Component;

/**
 * PersistenceLogLoginHookNoneImpl
 *
 * @author chenxueli
 * @date 2024-03-13 09:04:00
 */
@Slf4j
@Component
@ConditionalOnMissingBean(name = "persistenceLogLoginHook")
public class PersistenceLogLoginHookNoneImpl implements PersistenceLogLoginHook {

    /**
     * 执行方法
     *
     * @param entity 日志信息
     */
    @Override
    public void run(LogLoginEntity entity) {
        log.info(JSON.toJSONString(entity));
    }

}
